using System;
using Pinwheel.LSerialize.Formatters;

namespace Pinwheel.LSerialize
{
    public static partial class LFormatterProvider
    {
        internal static void RegisterBuiltinFormatters()
        {
            Register(new UnmanagedFormatter64<SByte>());
            Register(new UnmanagedArrayFormatter<SByte>());
            
            Register(new UnmanagedFormatter64<Byte>());
            Register(new UnmanagedArrayFormatter<Byte>());
            
            Register(new UnmanagedFormatter64<Int16>());
            Register(new UnmanagedArrayFormatter<Int16>());
            
            Register(new UnmanagedFormatter64<UInt16>());
            Register(new UnmanagedArrayFormatter<UInt16>());
            
            Register(new UnmanagedFormatter64<Int32>());
            Register(new UnmanagedArrayFormatter<Int32>());
            
            Register(new UnmanagedFormatter64<UInt32>());
            Register(new UnmanagedArrayFormatter<UInt32>());
            
            Register(new UnmanagedFormatter64<Int64>());
            Register(new UnmanagedArrayFormatter<Int64>());
            
            Register(new UnmanagedFormatter64<UInt64>());
            Register(new UnmanagedArrayFormatter<UInt64>());
            
            Register(new UnmanagedFormatter64<Char>());
            Register(new UnmanagedArrayFormatter<Char>());
            
            Register(new UnmanagedFormatter64<Single>());
            Register(new UnmanagedArrayFormatter<Single>());
            
            Register(new UnmanagedFormatter64<Double>());
            Register(new UnmanagedArrayFormatter<Double>());
            
            Register(new UnmanagedFormatter64<Boolean>());
            Register(new UnmanagedArrayFormatter<Boolean>());
            
            Register(new UnmanagedFormatter64<IntPtr>());
            Register(new UnmanagedArrayFormatter<IntPtr>());
            
            Register(new UnmanagedFormatter64<UIntPtr>());
            Register(new UnmanagedArrayFormatter<UIntPtr>());
            
            Register(new UnmanagedFormatter64<DateTime>());
            Register(new UnmanagedArrayFormatter<DateTime>());
            
            Register(new UnmanagedFormatter64<DateTimeOffset>());
            Register(new UnmanagedArrayFormatter<DateTimeOffset>());
            
            Register(new UnmanagedFormatter64<Guid>());
            Register(new UnmanagedArrayFormatter<Guid>());
            
            Register(new UnmanagedFormatter64<ValueHeader>());
            Register(new UnmanagedFormatter128<ReferenceHeader>());
            
            Register(new StringFormatter());
            Register(new TypeFormatter());
        }
    } 
}

